//
//  BBSAddPhotoCell.m
//  QuickCure
//
//  Created by 石玄机 on 16/9/13.
//  Copyright © 2016年 haoge. All rights reserved.


#import "BBSAddPhotoCell.h"



@interface BBSAddPhotoCell ()

@property (weak, nonatomic)  UIButton *addPhotoBtn;


@end

@implementation BBSAddPhotoCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self setupUI];
        
    }

    return self;
}

-(void)setupUI{

    UILabel *casePhotoLabel = [[UILabel alloc]init];
    casePhotoLabel.text = @"病例照片:";
    casePhotoLabel.font = FONT(18);
    [self.contentView addSubview:casePhotoLabel];
    
    [casePhotoLabel makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView).offset(10);
        make.left.equalTo(self.contentView).offset(15);
    }];
    
    UIButton *addPhotoBtn = [[UIButton alloc]init];
    
    [addPhotoBtn setBackgroundImage:[UIImage imageNamed:@"compose_pic_add_highlighted"] forState:UIControlStateNormal];
    
    self.addPhotoBtn = addPhotoBtn;
    
    [self.contentView addSubview:addPhotoBtn];
    
    [addPhotoBtn addTarget:self action:@selector(clickAddphotoBtn:) forControlEvents:UIControlEventTouchUpInside];
    
    [addPhotoBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.equalTo(casePhotoLabel.bottom).offset(20);
        
        make.left.equalTo(casePhotoLabel);
        
        make.width.height.equalTo(80);
        
    }];
    

}

#pragma mark
#pragma mark - 点击添加图片按钮
#pragma mark
#pragma mark - 添加相册图片
- (void)clickAddphotoBtn:(UIButton *)button{
    
    if (self.addPhotoBlock) {
        
        self.addPhotoBlock(button);
    }

}






@end














































